//调用接口配置文件
import { request } from 'config/request'
// import config from '../../../config/config'

//获取分销公司名称
export async function queryAgent (params) {
  return request({
    // url: `${config.hktServer1}admin/commissionRule/queryAgent`,
    url: `admin/commissionRule/queryAgent`,
    method: 'POST',
    data: params,
    headers: {
      'Content-type': 'application/json',
    }
  })
  
}
//录入保存
export async function create (params) {
  return request({
    // url: `admin/commissionRule/insert`,
    url: `admin/commissionRule/insertNew`,
    method: 'POST',
    data: params,
    headers: {
      'Content-type': 'application/json',
    }
  })
}

//提交审核
export async function submit(params) {
  return request({
      url: `admin/commissionRule/SubmitRuleC3`,
      method: 'POST',
      data: params,
  });
};

//编辑查看时获取数据
export async function queryInfo (params) {
  return request({
    // url: `admin/commissionRule/listDetailVersion`,
    url: `admin/commissionRule/listDetailVersionNew`,
    method: 'POST',
    data: params,
    headers: {
      'Content-type': 'application/json',
    }
  })
}

// 上传附件
export async function importAccount(params) {
  return request({
      url: 'admin/commissionRule/FileUpload',
      method: 'POST',
      headers: {
          "Content-type": "application/json"
      },
      data: params
  });
};

//删除附件
export async function delFile(params) {
  return request({
      url: `admin/commissionApply/deleteAsbeginId`,
      method: 'POST',
      data: params,
  });
};

//获取业态
export async function queryProductList(params) {
  return request({
      url: '3rd/commission/queryProductList',
      method: 'POST',
      data: params,
  });
};

